<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
    <title>Ajaxlab Command Prompt</title>
  		<link rel='stylesheet' href='../styles.css' type='text/css' />
		<link href="../ScriptLibrary/windows_js_0.85.2/themes/default.css" rel="stylesheet" type="text/css">
		<link href="../ScriptLibrary/windows_js_0.85.2/themes/theme1.css" rel="stylesheet" type="text/css">
		<link rel="stylesheet" type="text/css" href="../ScriptLibrary/windows_js_0.85.2/themes/mac_os_x.css">
		<link rel="stylesheet" type="text/css" href="../ScriptLibrary/windows_js_0.85.2/themes/alphacube.css">
		<script language="JavaScript" type="text/javascript" src="../ScriptLibrary/Atlas/Release/AtlasCompat.js"></script>
		<script language="JavaScript" type="text/javascript" src="../ScriptLibrary/Atlas/Release/Atlas.js"></script>
		<script language="JavaScript" type="text/javascript" src="../ScriptLibrary/scriptaculous-js-1.6.0/lib/prototype.js"></script>
		<script language="JavaScript" type="text/javascript" src="../ScriptLibrary/scriptaculous-js-1.6.0/src/effects.js"></script>
		<script language="JavaScript" type="text/javascript" src="../ScriptLibrary/windows_js_0.85.2/javascripts/window.js"></script>
		<script language="JavaScript" type="text/javascript" src="../ScriptLibrary/AjaxLabCommandPrompt/Engine/Abstract/CMD.js"></script>
		<script language="JavaScript" type="text/javascript" src="../ScriptLibrary/AjaxLabCommandPrompt/Engine/Core/CMD.js"></script>
		<script type="text/javascript">
		
		
		function pageLoad()
		{
			openDebugWindow();
			openCmd();
			
		}
		
		function openCmd()
		{
			var cmd = new AjaxLab.Engine.Core.Cmd( "Cmd",
												   "CmdPrompt",
												    null,
												   "http://www.ajaxlab.com",
												   "../");
			cmd.setIsDebug(false);
			openContentWindow();
		}
		
		function openContentWindow() {

				var contentWin = new Window('content_win', {
														className: "alphacube",
														title: "AjaxLab Command Prompt",
														maximizable: true, 
														resizable: true, 
														closable: true,
														hideEffect:Element.hide, 
														showEffect:Element.show
														}
										)

				var width = $('test_content').offsetWidth;
				var height = $('test_content').offsetHeight;
				contentWin.setContent('test_content', true, true);
				contentWin.setSize(width,height);
				contentWin.setLocation(420,120);
				contentWin.toFront();
				contentWin.setDestroyOnClose();
				contentWin.show();
				//contentWin.showCenter(true);	
				var myObserver = { 
					onEndResize	:	function(eventName, win)
					{
						if(win == contentWin)
						{
							$('CmdPrompt').style.width = win.width-15+"px";
							$('CmdPrompt').style.height = win.height-15+"px";
						}
					}, 
					
					onEndMaximize: function(eventName, win)
					{
						if(win == contentWin)
						{
							$('CmdPrompt').style.width = win.width-15+"px";
							$('CmdPrompt').style.height = win.height-15+"px";
						}
					}
				}
				Windows.addObserver(myObserver);
		}
		
		function openDebugWindow()
		{
				var contentWin = new Window('content_debug', {
														className: "dialog",
														title: "AjaxLab Command Prompt Debug",
														maximizable: true, 
														resizable: true,
														closable: true, 
														hideEffect:Element.hide, 
														showEffect:Element.show
														}
										)
				var width = $('item').style.width;
				var height = $('item').style.height;
				contentWin.setContent('item', true, true);
				contentWin.setLocation(420,120);
				contentWin.setSize(width,height);
				contentWin.toFront();
				contentWin.setDestroyOnClose();
				contentWin.show();	
				var myObserver = { 
					onEndResize	:	function(eventName, win)
					{
						if(win == contentWin)
						{
							$('item').style.width = win.width+"px";
							$('item').style.height = win.height+"px";
						}
					},
					
					onEndMaximize: function(eventName, win)
					{
						if(win == contentWin)
						{
							$('item').style.width = win.width+"px";
							$('item').style.height = win.height+"px";
						}
					}
					
				}
				Windows.addObserver(myObserver);
		}
		
		function BindSelectIPCount()
		{
			AjaxLabCmd.CMDLogParserDemo.SelectIPCount(IPCountCallBack);
		}
		
		function IPCountCallBack(res)
		{
			for(var i=0; i<res.value.Tables[0].Rows.length; i++)
			{
				$("IPCountResult").innerHTML=$("IPCountResult").innerHTML+res.value.Tables[0].Rows[i].IP + " : " + res.value.Tables[0].Rows[i].Total+"<br/>";
			}
		}
		
		</script>
</head>
<body>
	
		<table id="test_content">
			<tr>
				<td>
					<textarea style="BACKGROUND:#000000; COLOR:#ffffff" id="CmdPrompt" cols="80" rows="20" wrap="virtual"></textarea>
				</td>
			</tr>
		</table>
		<div id="item" style="FONT-SIZE:12px; OVERFLOW:scroll; WIDTH:750px; HEIGHT:200px; BACKGROUND-COLOR:black">
		</div>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><a href="../index.html">Home </a>- <a href="../LiveExamples.html">Live Examples</a> - Web Stats  </td>
          </tr>
        </table>
		
		<DIV id="myDiv" style="BORDER-RIGHT:red 1px solid; PADDING-RIGHT:2px; BORDER-TOP:red 1px solid; DISPLAY:none; PADDING-LEFT:2px; Z-INDEX:10; LEFT:0px; PADDING-BOTTOM:2px; BORDER-LEFT:red 1px solid; PADDING-TOP:2px; BORDER-BOTTOM:red 1px solid; POSITION:absolute; TOP:0px; BACKGROUND-COLOR:yellow">Suggested 
			text</DIV>
			
<div id="body">
    <h1>Command Prompt - Basic Prompt </h1>
    <p>This is the base command plug-in  for the Command Prompt (Based on Atlas Javascript Framework). These commands are available to all users by default (unless of course you get rid of its reference under /ScriptLibrary/AjaxLabCommandPrompt/Engine/Core/Cmd.js<br>
<br>
       Command List. <br>
      <br>
     Below are the basic commands available at you disposal. :) <br>
      <br>
<div>

<pre>
  clear			<br/>
  enable debug	<br/>
  disable debug	<br/>
  clear debug	<br/>
  cd			<br/>
  openurl http://www.yoururl.com <br/><br>
  For example, if you want to view slashdot.com, simply type<br>
  openurl http://www.slashdot.com<br>
  *You must include http:// in the front. <br>   In addition, you must include Prototype Window library for it to work. <a href="CustomizeTheLook.html">See documentation here.</a> 
</pre>

</div>
As you can see, there is an additional debug window on the screen. If you typed &quot;enable debug&quot;, then the debug messages<br>
I used will be shown on the screen.  This is intended for plugin authors to debug their own commands. <br>
<em><br>
<strong>*NOTE: With debug on? After awhile, you'll notice the speed start to become slow, at this point, it's better<br>
to either &quot;disable debug&quot; or &quot;clear debug&quot; before continuing your demo.</strong></em>
<h2>Credits</h2>
<p>AjaxLab.com, no download is available yet because I need to fix up some more. Meanwhile if you are interested, please email me : lx2222182@yahoo.com </p>
</body>
</html>